/*
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/kadence-theme/
Description: Kadence Child Theme
Author: Kadence WP
Author URI: https://www.kadencewp.com/
Template: kadence
Version: 1.0.0
Text Domain: kadence-child
*/

/* --- Global Variables for Custom Sections --- */
:root {
    --primary: #1a202c;
    --secondary: #D4AF37;
    --accent: #E8D8C8;
    --light-bg: #F8F9FA;
    --text-main: #1a202c;
    --text-light: #1a202c;
    --success: #1E8E3E;
    --danger: #D93025;
    --border: #EAEAEA;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 50px rgba(0,0,0,0.08);
    --font-head: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* --- Smart Top 3 Showcase --- */
.top-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
    padding-top: 20px;
    margin-bottom: 50px;
}

.smart-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
}

.smart-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.smart-card.rank-1 {
    transform: scale(1.08);
    z-index: 2;
    border: 2px solid var(--secondary);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.15);
}

.smart-card.rank-1:hover {
    transform: scale(1.08) translateY(-10px);
}

.smart-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-head);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.rank-1 .smart-badge { background: linear-gradient(135deg, #FFD700, #D4AF37); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); }
.rank-2 .smart-badge { background: linear-gradient(135deg, #E0E0E0, #9E9E9E); box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3); color: var(--primary); }
.rank-3 .smart-badge { background: linear-gradient(135deg, #E09F5C, #CD7F32); box-shadow: 0 4px 15px rgba(205, 127, 50, 0.3); }

.smart-img {
    width: 140px;
    height: 140px;
    margin: 15px auto 25px;
    background: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.85rem;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.rank-1 .smart-img { width: 160px; height: 160px; }

.smart-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 10px;
    line-height: 1.3;
}

.smart-rating {
    color: #FFB800;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.smart-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-light);
}

.smart-features li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.smart-features svg { color: var(--secondary); flex-shrink: 0; }

.smart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-head);
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.smart-btn:hover { background: #1a120d; gap: 12px; }
.rank-1 .smart-btn { background: var(--secondary); color: var(--primary); }
.rank-1 .smart-btn:hover { background: #e3c155; }

/* --- Smart Pros and Cons Design --- */
.smart-pc-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    margin-bottom: 50px;
}
.pc-col { flex: 1; padding: 40px; position: relative; }
.pc-col.pros { background: linear-gradient(to bottom, rgba(30, 142, 62, 0.02) 0%, transparent 100%); }
.pc-col.cons { background: linear-gradient(to bottom, rgba(217, 48, 37, 0.02) 0%, transparent 100%); }
.pc-divider { width: 1px; background: var(--border); position: absolute; top: 40px; bottom: 40px; left: 50%; }
.pc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; font-size: 1.4rem; font-weight: 700; font-family: var(--font-head); }
.pros .pc-header { color: var(--success); }
.cons .pc-header { color: var(--danger); }
.pc-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; }
.pros .pc-icon { background: var(--success); }
.cons .pc-icon { background: var(--danger); }
.pc-list { list-style: none; padding: 0; margin: 0; }
.pc-list li { margin-bottom: 16px; display: flex; align-items: flex-start; gap: 12px; color: var(--text-main); font-size: 1.05rem; }
.pc-list li svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; }
.pros .pc-list li svg { color: var(--success); }
.cons .pc-list li svg { color: var(--danger); }

/* --- Smart Comparison Table --- */
.smart-table-container {
    margin-bottom: 50px;
}
.smart-table-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.smart-table-search svg {
    color: var(--text-light);
    margin-right: 12px;
    flex-shrink: 0;
}
.smart-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    background: transparent;
}
.smart-table-wrapper { 
    overflow-x: auto; 
    border-radius: 16px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); 
    border: 1px solid #e2e8f0;
    border-top: 5px solid #0061c9;
    background: #fff;
}
.smart-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); table-layout: fixed; }
.smart-table th, .smart-table td { 
    padding: 16px 16px; 
    text-align: left; 
    vertical-align: middle; 
    border-bottom: 1px solid #e2e8f0; 
    border-right: 1px solid #f1f5f9;
}
.smart-table th:last-child, .smart-table td:last-child { border-right: none; }
.smart-table td { font-size: 14px; line-height: 1.6; font-weight: 400; color: #2D3748; overflow-wrap: break-word; word-wrap: break-word; }
.smart-table th { background: linear-gradient(to right, #f8fafc, #f1f5f9); color: #334155; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; border-bottom: 2px solid #e2e8f0; }
.smart-table tbody tr { transition: all 0.3s ease; background: #ffffff; }
.smart-table tbody tr:nth-child(even) { background: #fafaf9; }
.smart-table tbody tr:hover { background: #e0f2fe; transform: scale(1.005); box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: relative; z-index: 10; border-radius: 8px; }
.smart-table tbody tr:last-child td { border-bottom: none; }

.table-product-info { display: flex; align-items: center; gap: 15px; }
.table-product-thumb { width: 80px; height: 80px; background: transparent; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; color: #aaa; }
.table-product-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.table-product-name { font-family: var(--font-head); font-weight: 600; color: #2D3748; font-size: 14px; line-height: 24px; }
.table-badge { display: inline-block; background: rgba(212, 175, 55, 0.1); color: var(--secondary); padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; margin-top: 4px; }
.check-icon, .cross-icon { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.check-icon svg { color: var(--success); width: 18px; height: 18px; }
.cross-icon svg { color: var(--danger); width: 18px; height: 18px; }

.table-btn { background: linear-gradient(135deg, #0061c9, #2563eb); color: #ffffff !important; border: none; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 13px; transition: all 0.3s ease; display: block; text-align: center; box-shadow: 0 4px 10px rgba(0, 97, 201, 0.2); box-sizing: border-box; white-space: nowrap; }
.table-btn:hover { background: linear-gradient(135deg, #0052a3, #1d4ed8); color: #fff !important; transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 97, 201, 0.3); }

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .top-showcase { grid-template-columns: 1fr; gap: 50px; }
    .smart-card.rank-1 { transform: scale(1); }
    .smart-card.rank-1:hover { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .smart-pc-card { flex-direction: column; }
    .pc-divider { display: none; }
    .pc-col { padding: 30px 20px; }
    .pc-col.pros { border-bottom: 1px solid var(--border); }
    
    .smart-table-wrapper table.smart-table thead { display: none; }
    .smart-table-wrapper table.smart-table, 
    .smart-table-wrapper table.smart-table tbody, 
    .smart-table-wrapper table.smart-table tr, 
    .smart-table-wrapper table.smart-table td { display: block; width: 100%; box-sizing: border-box; }
    
    .smart-table-wrapper table.smart-table tr { margin-bottom: 20px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 10px; display: block; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
    .smart-table-wrapper table.smart-table td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; border-right: none; padding: 15px 10px; text-align: right; }
    .smart-table-wrapper table.smart-table td:last-child { border-bottom: none; justify-content: center; padding-top: 20px; padding-bottom: 10px; }
    .smart-table-wrapper table.smart-table td:last-child::before { display: none; }
    .smart-table-wrapper table.smart-table td::before { content: attr(data-label); font-weight: 600; color: #475569; text-align: left; margin-right: 15px; flex-shrink: 0; flex-basis: 35%; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
    .table-product-info { flex-direction: row; justify-content: flex-end; text-align: right; }
    .table-product-thumb { display: none; }
}
