/* Kaif Pro — Product Page & Admin Styles */

/* Product Page Layout */
.kaif-product-page { padding: 32px 0 64px; }
.kaif-product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 40px; align-items: start; }
.kaif-product-breadcrumb { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.kaif-product-breadcrumb a { color: #0F6E56; text-decoration: none; }
.kaif-product-cat { font-size: 12px; color: #0F6E56; background: #E1F5EE; padding: 3px 10px; border-radius: 20px; display: inline-block; margin-bottom: 10px; }
.kaif-product-title { font-size: clamp(22px,3vw,32px); font-weight: 700; line-height: 1.3; margin-bottom: 12px; }

/* Price Block */
.kaif-price-block { margin: 16px 0; }
.kaif-price-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.kaif-retail-price .woocommerce-Price-amount { font-size: 28px; font-weight: 700; color: #0F6E56; }

/* Sections */
.kaif-section { background: #fff; border-radius: 16px; border: 1px solid #e5e7eb; padding: 24px; margin-bottom: 24px; }
.kaif-section-heading { font-size: 18px; font-weight: 600; color: #111827; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.kaif-section-heading .ti { font-size: 20px; color: #0F6E56; }
.kaif-section-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.kaif-section-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.kaif-last-sync { font-size: 12px; color: #6b7280; }
.kaif-member-badge { background: #FAEEDA; color: #633806; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }

/* Wholesale Section */
.kaif-wholesale-section { border-color: #E1F5EE; }

/* Tier Table Frontend */
.kaif-tier-table-front { width: 100%; border-collapse: collapse; font-size: 14px; }
.kaif-tier-table-front th { background: #0F6E56; color: white; padding: 10px 14px; text-align: left; font-weight: 600; font-size: 13px; }
.kaif-tier-table-front th:first-child { border-radius: 8px 0 0 0; }
.kaif-tier-table-front th:last-child { border-radius: 0 8px 0 0; }
.kaif-tier-row td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; transition: background 0.2s; cursor: pointer; }
.kaif-tier-row:hover td { background: #E1F5EE; }
.kaif-tier-row.active td { background: #E1F5EE; font-weight: 600; }
.kaif-tier-price { color: #0F6E56; font-weight: 700; font-size: 16px; }
.kaif-savings-badge { background: #E1F5EE; color: #0F6E56; font-size: 12px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }

/* Wholesale simple */
.kaif-wholesale-simple { display: flex; align-items: center; gap: 12px; padding: 14px; background: #E1F5EE; border-radius: 10px; }
.kaif-ws-label { font-size: 13px; color: #0F6E56; }
.kaif-ws-price { font-size: 24px; font-weight: 700; color: #085041; }

/* Calculator */
.kaif-calculator { background: #f9fafb; border-radius: 12px; padding: 18px; margin-top: 16px; border: 1px solid #e5e7eb; }
.kaif-calc-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 14px; }
.kaif-calc-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kaif-calc-row label { font-size: 13px; color: #6b7280; white-space: nowrap; }
.kaif-qty-input { display: flex; align-items: center; gap: 0; }
.kaif-qty-btn { width: 36px; height: 36px; background: #0F6E56; color: white; border: none; font-size: 18px; cursor: pointer; line-height: 1; }
.kaif-qty-btn:first-child { border-radius: 8px 0 0 8px; }
.kaif-qty-btn:last-child { border-radius: 0 8px 8px 0; }
#kaif-qty { width: 70px; height: 36px; border: 1px solid #e5e7eb; border-radius: 0; text-align: center; font-size: 16px; font-weight: 600; }
.kaif-calc-result { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kaif-calc-item { background: white; border-radius: 8px; padding: 10px; border: 1px solid #e5e7eb; text-align: center; }
.kaif-calc-item span { display: block; font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.kaif-calc-item strong { display: block; font-size: 16px; color: #111827; font-weight: 700; }
.kaif-calc-total strong { color: #0F6E56; font-size: 20px; }
.kaif-tier-note { font-size: 12px; color: #854F0B; margin-top: 8px; }

/* Wholesale locked */
.kaif-wholesale-locked { background: #f9fafb; border: 1.5px dashed #e5e7eb; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kaif-lock-icon { font-size: 32px; flex-shrink: 0; }
.kaif-lock-text { flex: 1; }
.kaif-lock-text strong { display: block; font-size: 15px; color: #111827; margin-bottom: 4px; }
.kaif-lock-text span { font-size: 13px; color: #6b7280; }
.kaif-lock-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Entrepreneur box */
.kaif-entrepreneur-box { background: linear-gradient(135deg,#085041,#1D9E75); border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; margin: 16px 0; color: white; }
.kaif-ent-icon { font-size: 28px; flex-shrink: 0; }
.kaif-entrepreneur-box strong { display: block; font-size: 15px; color: white; margin-bottom: 4px; }
.kaif-entrepreneur-box span { font-size: 12px; color: rgba(255,255,255,0.8); }

/* Add to cart */
.kaif-atc-wrap { margin: 20px 0; }
.kaif-atc-wrap .single_add_to_cart_button { background: #0F6E56 !important; color: white !important; border: none !important; border-radius: 10px !important; padding: 14px 28px !important; font-size: 16px !important; font-weight: 600 !important; width: 100% !important; cursor: pointer !important; transition: all .2s !important; }
.kaif-atc-wrap .single_add_to_cart_button:hover { background: #085041 !important; }

/* Competitor Table */
.kaif-comp-table-wrap { overflow-x: auto; }
.kaif-comp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kaif-comp-table th { background: #f9fafb; padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
.kaif-comp-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.kaif-my-row td { background: #E1F5EE; }
.kaif-comp-price { font-weight: 700; font-size: 15px; }
.kaif-store-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; }
.kaif-store-mine { background: #0F6E56; color: white; }
.kaif-store-name { font-size: 14px; font-weight: 500; }
.kaif-badge-green { background: #E1F5EE; color: #0F6E56; font-size: 12px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.kaif-badge-red { background: #FCEBEB; color: #791F1F; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.kaif-badge-amber { background: #FAEEDA; color: #633806; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.kaif-comp-btn { font-size: 12px; padding: 5px 12px; border-radius: 6px; background: #0F6E56; color: white; text-decoration: none; display: inline-block; white-space: nowrap; }
.kaif-comp-btn-ext { background: #f9fafb; color: #0F6E56; border: 1px solid #e5e7eb; }
.kaif-comp-note { font-size: 12px; color: #9ca3af; margin-top: 12px; }

/* Profit Calculator */
.kaif-profit-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; align-items: start; }
.kaif-profit-field { margin-bottom: 14px; }
.kaif-profit-field label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.kaif-profit-field input { width: 100%; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 15px; }
.kaif-profit-field input:focus { border-color: #0F6E56; outline: none; box-shadow: 0 0 0 3px rgba(15,110,86,0.1); }
.kaif-profit-results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kaif-profit-card { background: #f9fafb; border-radius: 10px; padding: 14px; border: 1px solid #e5e7eb; }
.kaif-pc-highlight { background: #E1F5EE; border-color: #5DCAA5; }
.kaif-pc-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.kaif-pc-value { display: block; font-size: 20px; font-weight: 700; color: #111827; }
.kaif-profit-suggestion { background: #FAEEDA; border-radius: 10px; padding: 12px 16px; font-size: 14px; color: #633806; margin-top: 16px; }

/* YouTube */
.kaif-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; background: #000; }
.kaif-video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: 12px; }
.kaif-video-note { font-size: 13px; color: #6b7280; margin-top: 12px; }
.kaif-video-note a { color: #0F6E56; }

/* Admin Styles */
.kaif-admin-wrap { max-width: 1000px; }
.kaif-admin-header { background: linear-gradient(135deg,#085041,#1D9E75); border-radius: 12px; padding: 24px 28px; margin-bottom: 24px; }
.kaif-admin-header h1 { color: white; margin: 0 0 4px; font-size: 22px; }
.kaif-admin-header p { color: rgba(255,255,255,0.75); margin: 0; font-size: 13px; }
.kaif-tabs { display: flex; gap: 4px; margin-bottom: 0; border-bottom: 2px solid #e5e7eb; }
.kaif-tab { background: transparent; border: none; padding: 10px 16px; font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.kaif-tab.active { color: #0F6E56; border-bottom-color: #0F6E56; }
.kaif-tab-content { display: none; }
.kaif-tab-content.active { display: block; }
.kaif-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-top: 16px; }
.kaif-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.kaif-field { margin-bottom: 16px; }
.kaif-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.kaif-input, .kaif-select { width: 100%; max-width: 480px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.kaif-input:focus, .kaif-select:focus { border-color: #0F6E56; outline: none; }
.kaif-desc { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.kaif-help { font-size: 13px; color: #6b7280; margin-bottom: 16px; background: #f9fafb; padding: 10px 14px; border-radius: 8px; }
.kaif-info-box { background: #E1F5EE; border: 1px solid #5DCAA5; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #085041; margin-bottom: 20px; }
.kaif-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kaif-toggle-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; background: #f9fafb; border-radius: 8px; border: 1px solid #e5e7eb; }
.kaif-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.kaif-toggle input { opacity: 0; width: 0; height: 0; }
.kaif-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #d1d5db; border-radius: 24px; transition: .3s; }
.kaif-toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
.kaif-toggle input:checked + .kaif-toggle-slider { background: #0F6E56; }
.kaif-toggle input:checked + .kaif-toggle-slider:before { transform: translateX(20px); }
.kaif-toggle-label { font-size: 13px; font-weight: 600; color: #374151; display: block; }
.kaif-toggle-desc { font-size: 12px; color: #6b7280; margin-top: 2px; display: block; }
.kaif-action-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
#kaif-sync-status { font-size: 13px; font-weight: 500; }
.kaif-sheet-format { margin-top: 20px; background: #f9fafb; border-radius: 8px; padding: 16px; }
.kaif-sheet-format h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.kaif-format-table { width: 100%; border-collapse: collapse; font-size: 12px; overflow-x: auto; display: block; }
.kaif-format-table th { background: #0F6E56; color: white; padding: 6px 10px; text-align: left; }
.kaif-format-table td { padding: 6px 10px; border: 1px solid #e5e7eb; }
.kaif-format-table tr.example td { background: #E1F5EE; font-style: italic; }
.kaif-save-bar { position: sticky; bottom: 0; background: white; padding: 16px 0; border-top: 1px solid #e5e7eb; margin-top: 24px; z-index: 10; }
.kaif-tier-wrap { }
.kaif-tier-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.kaif-tier-table th { background: #0F6E56; color: white; padding: 8px 12px; text-align: left; font-size: 13px; }
.kaif-tier-table td { padding: 8px 12px; border: 1px solid #e5e7eb; }
.kaif-tier-table input { width: 80px; }
.kaif-status { padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.kaif-status-success { background: #E1F5EE; color: #0F6E56; }
.kaif-status-error { background: #FCEBEB; color: #791F1F; }
.kaif-status-warning { background: #FAEEDA; color: #633806; }

/* Responsive */
@media (max-width: 768px) {
    .kaif-product-grid { grid-template-columns: 1fr; gap: 24px; }
    .kaif-calc-result { grid-template-columns: 1fr 1fr; }
    .kaif-profit-grid { grid-template-columns: 1fr; }
    .kaif-profit-results { grid-template-columns: 1fr 1fr; }
    .kaif-toggle-grid { grid-template-columns: 1fr; }
    .kaif-wholesale-locked { flex-direction: column; text-align: center; }
}
