/* =============================================
   CUSTOM SINGLE PRODUCT PAGE
   Font: Roboto | Primary: #1652a6
   File: woostify-child/single-product-custom.css
   ============================================= */

/* ── Reset wrapper ── */
.sp-custom-wrap { font-family: 'Roboto', sans-serif; }

/* ── Breadcrumb ── */
.sp-breadcrumb-bar { background: #f5f8ff; border-bottom: 1px solid #e8edf5; padding: 10px 0; margin-bottom: 32px; }
.sp-breadcrumb-bar .woocommerce-breadcrumb { font-size: 13px; color: #888; margin: 0; padding: 0; background: none; border: none; }
.sp-breadcrumb-bar .woocommerce-breadcrumb a { color: #1652a6; text-decoration: none; }

/* ── Container & Layout ── */
.sp-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sp-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; padding-bottom: 60px; }

/* ── Top grid: gallery + info ── */
.sp-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 40px; }

/* ── Gallery ── */
.sp-gallery__main {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8edf5;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sp-gallery__main img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.2s ease; }

.sp-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sp-thumb-item {
  width: 72px; height: 72px;
  border-radius: 8px; overflow: hidden;
  border: 2px solid #e8edf5;
  cursor: pointer;
  transition: border-color 0.2s ease;
  padding: 4px;
  flex-shrink: 0;
}
.sp-thumb-item img { width: 100%; height: 100%; object-fit: contain; }
.sp-thumb-item:hover, .sp-thumb-item.active { border-color: #1652a6; }

/* ── Product Info ── */
.sp-category { font-size: 12px; font-weight: 600; color: #1652a6; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; display: none;}
.sp-category a { color: #1652a6; text-decoration: none; }

.sp-title { font-family: 'Roboto', sans-serif !important; font-size: 1.6rem !important; font-weight: 800 !important; color: #0f2444 !important; line-height: 1.3 !important; margin-bottom: 16px !important; }
.sp-divider { width: 48px; height: 3px; background: #1652a6; border-radius: 2px; margin-bottom: 20px; display: none;}
.sp-short-desc { font-size: 14.5px; color: #555; line-height: 1.75; margin-bottom: 20px; border-bottom: 1px solid #e8edf5;}

/* ── Buttons ── */
.sp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.sp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  font-family: 'Roboto', sans-serif; font-size: 13.5px; font-weight: 600;
  border-radius: 6px; text-decoration: none !important;
  transition: all 0.25s ease; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer;
}
.sp-btn--primary { background: #1652a6; color: #fff !important; border-color: #1652a6; }
.sp-btn--primary:hover { background: #0f3d7e; border-color: #0f3d7e; color: #fff !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(22,82,166,.25); }
.sp-btn--outline { background: transparent; color: #1652a6 !important; border-color: #1652a6; }
.sp-btn--outline:hover { background: #1652a6; color: #fff !important; transform: translateY(-1px); }

/* ── Share ── */
.sp-share { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #888; }
.sp-share a { color: #1652a6; display: flex; align-items: center; transition: opacity 0.2s; }
.sp-share a:hover { opacity: 0.7; }

/* ── Tabs ── */
.sp-tabs { border: 1px solid #e8edf5; border-radius: 12px; overflow: hidden; }
.sp-tabs__nav { display: flex; border-bottom: 1px solid #e8edf5; background: #f7f9fc; }
.sp-tab-btn {
  padding: 14px 28px;
  font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 600;
  color: #888; background: none; border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer; transition: all 0.2s ease; margin-bottom: -1px;
}
.sp-tab-btn:hover { color: #1652a6; }
.sp-tab-btn.active { color: #1652a6; border-bottom-color: #1652a6; background: #fff; }

.sp-tabs__content { }
.sp-tab-panel { display: none; padding: 28px; }
.sp-tab-panel.active { display: block; }
.sp-tab-panel p, .sp-tab-panel li { color: #555; line-height: 1.75; }

/* ── Specs table ── */
.sp-specs-table { width: 100%; border-collapse: collapse; }
.sp-specs-table tr:nth-child(even) { background: #f7f9fc; }
.sp-specs-table th, .sp-specs-table td { padding: 11px 16px; font-size: 14px; text-align: left; border-bottom: 1px solid #eef1f7; }
.sp-specs-table th { font-weight: 600; color: #0f2444; width: 40%; background: #eef3fb; }
.sp-specs-table td { color: #555; }

/* ── Sidebar ── */
.sp-widget { background: #fff; border: 1px solid #e8edf5; border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.sp-widget__title {
  font-family: 'Roboto', sans-serif !important; font-size: 14px !important; font-weight: 700 !important;
  color: #fff !important; background: #1652a6;
  padding: 14px 20px !important; margin: 0 !important;
  text-transform: uppercase; letter-spacing: 0.06em; display: block;
}

/* ── Category list ── */
.sp-cat-list { list-style: none; margin: 0; padding: 8px 0; }
.sp-cat-list li { border-bottom: 1px solid #f0f4f9; }
.sp-cat-list li:last-child { border-bottom: none; }
.sp-cat-list li a { display: flex; align-items: center; gap: 8px; padding: 10px 18px; font-size: 13.5px; color: #444; text-decoration: none; transition: all 0.2s ease; }
.sp-cat-list li a:hover, .sp-cat-list li.active a { background: #f0f5ff; color: #1652a6; padding-left: 22px; }
.sp-cat-arrow { font-size: 16px; color: #1652a6; font-weight: 700; line-height: 1; }

/* ── Related products ── */
.sp-related-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none !important; border-bottom: 1px solid #f0f4f9; transition: background 0.2s ease; }
.sp-related-item:last-child { border-bottom: none; }
.sp-related-item:hover { background: #f0f5ff; }
.sp-related-img { width: 58px; height: 58px; border-radius: 8px; overflow: hidden; border: 1px solid #e8edf5; flex-shrink: 0; background: #f7f9fc; padding: 4px; }
.sp-related-img img { width: 100%; height: 100%; object-fit: contain; }
.sp-related-info { flex: 1; min-width: 0; }
.sp-related-name { font-size: 13px; font-weight: 600; color: #0f2444; line-height: 1.4; margin-bottom: 4px; transition: color 0.2s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-related-item:hover .sp-related-name { color: #1652a6; }
.sp-related-link { font-size: 12px; color: #1652a6; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .sp-layout { grid-template-columns: 1fr; }
  .sp-sidebar { order: -1; }
}
@media (max-width: 767px) {
  .sp-top-grid { grid-template-columns: 1fr; }
  .sp-title { font-size: 1.3rem !important; }
  .sp-tab-btn { padding: 12px 16px; font-size: 13px; }
  .sp-tab-panel { padding: 20px; }
}
aside.sp-sidebar {
    position: static;
}

/* Desktop (>= 1024px) thì bật sticky */
@media (min-width: 1024px) {
    aside.sp-sidebar {
        position: sticky;
        top: 109px;
    }
}
.sp-related-carousel { padding: 8px 0 10px; background: #f7f9fc; }
.sp-related-carousel__title { font-family: 'Roboto', sans-serif; font-size: 1.6rem; font-weight: 800; color: #0f2444; text-align: center; }

/* Nút 1: Báo giá — màu xanh đậm */
.btn-contact:first-child {
  background: #1652a6 !important;
  border-color: #1652a6 !important;
  color: #fff !important;
}
 
.btn-contact:first-child:hover {
  background: #0f3d7e !important;
  border-color: #0f3d7e !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 16px rgba(22,82,166,0.3) !important;
}
 
sp-custom-wrap .contact-title {
  font-family: 'Roboto', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  margin: 0 0 16px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid #e8edf5 !important;
  line-height: 1.4 !important;
}
 
.sp-custom-wrap .contact-buttons {
  display: flex !important;
  gap: 12px !important;
  margin-top: 16px !important;
}
 
/* Reset hoàn toàn style mặc định của thẻ <a> */
.sp-custom-wrap .contact-buttons a.btn-contact,
.sp-custom-wrap .contact-buttons a.btn-contact:link,
.sp-custom-wrap .contact-buttons a.btn-contact:visited,
.sp-custom-wrap .contact-buttons a.btn-contact:hover {
  text-decoration: none !important;
  outline: none !important;
}
 
/* Style nút chung */
.sp-custom-wrap .contact-buttons a.btn-contact {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex: 1 !important;
  padding: 14px 16px !important;
  border-radius: 8px !important;
  font-family: 'Roboto', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  transition: all 0.25s ease !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}
.contact-box {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
}

/* tiêu đề */
.contact-title {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Nút 1 — nền xanh đặc */
.sp-custom-wrap .contact-buttons a.btn-contact:first-child {
  background: #1652a6 !important;
  color: #ffffff !important;
  border: 2px solid #1652a6 !important;
}
 
.sp-custom-wrap .contact-buttons a.btn-contact:first-child:hover {
  background: #0f3d7e !important;
  border-color: #0f3d7e !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(22,82,166,0.3) !important;
}
 
/* Nút 2 — outline */
.sp-custom-wrap .contact-buttons a.btn-contact:last-child {
  background: transparent !important;
  color: #1652a6 !important;
  border: 2px solid #1652a6 !important;
}
 
.sp-custom-wrap .contact-buttons a.btn-contact:last-child:hover {
  background: #1652a6 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(22,82,166,0.25) !important;
}
 
/* Icon Font Awesome */
.sp-custom-wrap .contact-buttons a.btn-contact i {
  font-size: 15px !important;
  line-height: 1 !important;
  pointer-events: none !important;
}
 
/* Mobile */
@media (max-width: 520px) {
  .sp-custom-wrap .contact-buttons {
    flex-direction: column !important;
  }
}
/* Form Báo Giá */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,20,50,0.55); z-index: 9998;
  backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 20px;
}
.overlay.active { display: flex; }
.popup {
  background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slideUp 0.25s ease; overflow: hidden;
}
@keyframes slideUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
.popup-header {
  background: #1e2d6b; color: #fff; padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.popup-header h3 { font-size: 15px; font-weight: 600; }
.btn-close {
  background: none; border: none; color: rgba(255,255,255,0.8);
  font-size: 22px; cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.btn-close:hover { color:#fff; background:rgba(255,255,255,0.15); }
.popup-body { padding: 22px 24px 24px; }
.form-row {
  display: grid; grid-template-columns: 130px 1fr;
  align-items: start; gap: 8px; margin-bottom: 14px;
}
.form-row label { font-size:13.5px; color:#374151; padding-top:9px; text-align:right; }
.form-row .req { color:#e53e3e; }
.form-row input, .form-row textarea {
  width:100%; padding:8px 12px; border:1px solid #d1d5db;
  border-radius:6px; font-size:13.5px; color:#1f2937; font-family:inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus, .form-row textarea:focus {
  outline:none; border-color:#3b4fa8;
  box-shadow: 0 0 0 3px rgba(59,79,168,0.12);
}
.form-row textarea { resize:vertical; min-height:100px; }
.captcha-row {
  display:grid; grid-template-columns:130px 1fr;
  align-items:center; gap:8px; margin-bottom:14px;
}
.captcha-row label { font-size:13.5px; color:#374151; text-align:right; }
.captcha-inline { display:flex; align-items:center; gap:12px; }
.captcha-inline input {
  width:90px; padding:8px 12px; border:1px solid #d1d5db;
  border-radius:6px; font-size:13.5px; font-family:inherit;
}
.captcha-code {
  font-size:18px; font-weight:700; color:#1e2d6b; letter-spacing:4px;
  background:#eef1fb; padding:6px 14px; border-radius:6px;
  cursor:pointer; user-select:none;
}
.captcha-hint { font-size:11px; color:#9ca3af; margin-top:2px; }
.btn-submit {
  width:100%; padding:13px; background:#1e2d6b; color:#fff;
  border:none; border-radius:7px; font-size:14px; font-weight:700;
  cursor:pointer; margin-top:6px; transition:background 0.2s;
}
.btn-submit:hover { background:#162055; }
.btn-submit:disabled { background:#9ca3af; cursor:not-allowed; }
.err-msg { font-size:11.5px; color:#dc2626; margin-top:4px; display:none; }
.toast {
  display:none; position:fixed; bottom:28px; right:28px; z-index:9999;
  padding:14px 20px; border-radius:8px; font-size:14px;
  font-weight:500; color:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.15);
  max-width:340px;
}
.toast.success { background:#16a34a; }
.toast.error   { background:#dc2626; }
.toast.active  { display:block; }

/* ── Popup Overlay ── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.overlay.active {
    display: flex !important;
}
.popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    margin: 20px;
}
.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e8edf5;
    background: #1652a6;
    border-radius: 12px 12px 0 0;
}
.popup-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #fff !important;
}
.btn-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}
.btn-close:hover { background: rgba(255,255,255,0.35); }
.popup-body { padding: 24px; }
.form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    align-items: start;
    margin-bottom: 14px;
}
.form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    padding-top: 8px;
}
.form-row input,
.form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-row input:focus,
.form-row textarea:focus { border-color: #1652a6; }
.form-row textarea { height: 80px; resize: vertical; }
.captcha-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    align-items: start;
    margin-bottom: 14px;
}
.captcha-row label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    padding-top: 8px;
}
.captcha-inline { display: flex; gap: 10px; align-items: center; }
.captcha-inline input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
}
.captcha-code {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #1652a6;
    background: #f0f5ff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    border: 1px dashed #1652a6;
    font-family: monospace;
}
.captcha-hint { font-size: 11px; color: #aaa; margin-top: 4px; }
.req { color: #dc2626; }
.err-msg {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}
.btn-submit {
    width: 100%;
    padding: 12px;
    background: #1652a6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
    font-family: 'Roboto', sans-serif;
}
.btn-submit:hover { background: #0f3d7e; }
.btn-submit:disabled { background: #aaa; cursor: not-allowed; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    z-index: 999999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.toast.active { opacity: 1; transform: translateY(0); }
.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }

/* Contact box */
.contact-box {
    background: #f0f5ff;
    border: 1px solid #d0e0f8;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
}
.contact-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f2444 !important;
    margin: 0 0 12px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #1652a6;
    color: #fff !important;
    border: none;
}
.btn-contact:hover {
    background: #0f3d7e;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .form-row,
    .captcha-row { grid-template-columns: 1fr; }
    .popup { margin: 10px; }
}