/**
 * Frontend Styles
 *
 * @package chakra-biomed
 */

.product-showcase {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Top Section - Image Left, Info Right */
.product-top-section {
    max-width: 900px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    background: #fff;
    padding: 30px;
}

.product-image-left {
    position: relative;
}

.product-image-left img {
    max-width: 300px;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-image-left img:hover {
    transform: scale(1.02);
}

.product-info-right h1 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.product-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-detail-item:last-child {
    border-bottom: none;
}

.product-detail-item strong {
    min-width: 180px;
    flex-shrink: 0;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail-item span {
    flex: 1;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.product-quote-top {
    margin-top: 20px;
}

.product-quote-top .product-quote-button {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-quote-top .product-quote-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004060 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

/* Tabs Section */
.product-tabs {
    max-width: 900px;
    margin: 0 auto 50px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.product-tabs-nav {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.product-tab-link {
    background: none;
    border: none;
    padding: 18px 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-tab-link:hover {
    color: #007cba;
    background: rgba(0, 124, 186, 0.05);
}

.product-tab-link.active {
    color: #007cba;
    background: #fff;
    border-bottom-color: #007cba;
}

.product-tabs-content {
    padding: 35px;
    min-height: 200px;
}

.product-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.product-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-tab-content p {
    line-height: 1.8;
    color: #444;
    font-size: 15px;
    margin-bottom: 15px;
}

.product-tab-content ul,
.product-tab-content ol {
    padding-left: 20px;
    line-height: 1.8;
    color: #444;
}

.product-tab-content li {
    margin-bottom: 10px;
}

.product-tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.product-tab-content table th,
.product-tab-content table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.product-tab-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.product-tab-content table tr:last-child td {
    border-bottom: 2px solid #007cba;
}

.product-tab-content table tr:hover {
    background-color: #f8f9fa;
}

.product-gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-gallery-images img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-gallery-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Content Section */
.product-description {
    margin-bottom: 0;
    background: #f5f7fa;
    padding: 60px 0;
    line-height: 1.9;
    color: #444;
    font-size: 15px;
}

.product-description > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

.product-description h1 {
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.8em;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.product-description h2,
.product-description h3 {
    color: #1a1a1a;
    margin-top: 30px;
    margin-bottom: 15px;
}

.product-description h2 {
    font-size: 1.8em;
    font-weight: 700;
}

.product-description h3 {
    font-size: 1.4em;
    font-weight: 600;
}

.product-description p {
    margin-bottom: 15px;
}

.product-description ul,
.product-description ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.product-description li {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-top-section {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .product-top-section {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }
    
    .product-image-left img {
        max-width: 100%;
    }
    
    .product-info-right h1 {
        font-size: 2em;
    }
    
    .product-tabs {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .product-tabs-nav {
        flex-direction: column;
    }
    
    .product-tab-link {
        border-bottom: 1px solid #e9ecef;
        border-left: 3px solid transparent;
        text-align: left;
        padding: 15px 20px;
    }
    
    .product-tab-link.active {
        border-left-color: #007cba;
        border-bottom-color: #e9ecef;
    }
    
    .product-tabs-content {
        padding: 20px;
    }
    
    .product-detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .product-detail-item strong {
        min-width: auto;
    }
    
    .product-gallery-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-gallery-images img {
        height: 150px;
    }
    
    .product-description {
        padding: 40px 0;
    }
    
    .product-description > * {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .product-description h1 {
        font-size: 2.2em;
    }
}

/* Archive / Grid styles */
.products-archive { padding: 40px 0; background: #fff; }
.products-archive-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.archive-filters { margin-bottom: 30px; }
.filters-row { display:flex; gap:18px; align-items:flex-end; flex-wrap:wrap; }
.filters-row .filter-col { flex: 1 1 220px; display:flex; flex-direction:column; }
.filters-row label { font-size:14px; color:#555; margin-bottom:8px; font-weight:600; }
.filters-row select { padding:10px 12px; border-radius:8px; border:1px solid #eaeaea; background:#fff; font-size:15px; }
.filter-actions { display:flex; gap:10px; align-items:center; }
.btn-filter-reset { padding:10px 16px; border-radius:8px; cursor:pointer; font-weight:700; background:transparent; color:#b88f3f; border:1px solid #b88f3f; }
.btn-filter-reset { background:transparent; color:#b88f3f; border:1px solid #b88f3f; }

.archive-header { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:18px; }
.archive-header h2 { margin:0; font-size:26px; color:#1a1a1a; }
.archive-count { color:#888; font-size:14px; }

.product-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { display:block; text-decoration:none; border-radius:10px; overflow:hidden; border:1px solid #eee; background:#faf8f6; color:inherit; transition:transform .15s ease,box-shadow .15s ease; }
.product-card:hover { transform:translateY(-6px); box-shadow:0 12px 30px rgba(0,0,0,0.08); }
.product-card-media { height:200px; background:#fff; display:flex; align-items:center; justify-content:center; border-bottom:1px solid #eee; }
.product-card-media img { max-width:100%; max-height:100%; object-fit:cover; }
.product-card-body { padding:16px; }
.product-card-sku { font-size:12px; color:#666; margin-bottom:6px; }
.product-card-title { font-size:15px; margin:0 0 8px; color:#333; font-weight:700; }
.product-card-sub { display:flex; justify-content:space-between; gap:8px; align-items:center; color:#333; font-weight:600; margin-bottom:12px; }
.product-card-meta { display:flex; gap:8px; flex-wrap:wrap; color:#666; font-size:13px; }
.product-card .meta-item.available { color:#555; font-weight:700; }

.no-results { padding:30px; background:#fff7f0; border-radius:8px; border:1px dashed #f2d7c4; color:#6a4c28; }
.archive-pagination { margin-top:24px; text-align:center; }

@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 820px) { .product-grid { grid-template-columns: repeat(2,1fr); } .filters-row { gap:12px; } }
@media (max-width: 520px) { .product-grid { grid-template-columns: repeat(1,1fr); } .filters-row .filter-col { flex:1 1 100%; } .filters-row { align-items:stretch; }
    .archive-header { flex-direction:column; align-items:flex-start; gap:8px; }
}

/* Select2 custom theme overrides to better match site visuals */
.select2-container--default .select2-selection--single {
    background: #fff;
    border: 1px solid rgba(184,143,63,0.15);
    border-radius: 8px;
    height: 44px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 4px 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #222;
    line-height: 34px;
    font-weight: 600;
    padding-left: 6px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #8a8a8a;
    font-weight: 600;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 8px;
}
.select2-container--default .select2-selection--single .select2-selection__clear { display: none; }
.select2-container--default .select2-results__option {
    padding: 10px 12px;
    color: #222;
}
.select2-container--default .select2-results__option--highlighted {
    background-color: #f7efe0;
    color: #1a1a1a;
}
.select2-dropdown {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Ensure select2 container fills our filter column */
.filters-row .select2-container { width: 100% !important; }

/* Slight spacing tweak for Reset button alignment */
.filter-actions { align-items: center; }

/* Make Reset button same height as Select2 fields */
.btn-filter-reset {
    height: 37px;
    line-height: 1;
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Make the visible Select2 selection and reset button visually aligned */
.select2-container--default .select2-selection--single { box-sizing: border-box; }
.filters-row .filter-col { display:flex; flex-direction:column; }
.filters-row .filter-col .select2-container { margin-top: 0; }


.select2-container .select2-selection--single {
    height: 37px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px !important;
}

/* Quote modal styles */
.cb-quote-modal { display:none; position:fixed; inset:0; z-index:12000; }
.cb-quote-modal.open { display:block; }
.cb-quote-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.45); }
.cb-quote-dialog { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); width:92%; max-width:720px; background:#ffffff; border-radius:12px; z-index:12010; box-shadow:0 30px 80px rgba(0,0,0,0.25); }
.cb-quote-inner { padding:26px 28px; }
.cb-quote-close { position:absolute; right:12px; top:8px; border:0; background:transparent; font-size:22px; cursor:pointer; color:#666; }
.cb-quote-inner h3 { margin-top:0; margin-bottom:16px; font-size:20px; color:#1a1a1a; }
.cb-quote-content { background:transparent; }

/* CF7 default form spacing in the modal */
.cb-quote-content .wpcf7-form p { margin:0 0 12px; }
.cb-quote-content .wpcf7-form input[type="text"], .cb-quote-content .wpcf7-form input[type="email"], .cb-quote-content .wpcf7-form textarea, .cb-quote-content .wpcf7-form select { width:100%; padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; }
.cb-quote-content .wpcf7-form input[type="submit"] { background: linear-gradient(135deg, #b88f3f 0%, #8a6f3c 100%); color:#fff; border:0; padding:10px 16px; border-radius:8px; cursor:pointer; }

@media (max-width:520px){ .cb-quote-dialog { width:96%; } .cb-quote-inner { padding:18px; } }