:root {
    --bg: #f5f5f5;
    --black: #000;
    --muted: #555;
    --card-bg: #fff;
    --border: #e6e6e6;
    --shadow: 0 6px 18px rgba(0,0,0,0.06);
    --radius: 6px;
    --gap: 16px;
    --accent: #666;
    --light: #f2f2f2;
    --text: #222;
    --btn-width: 110px;
    --spacing: 20px;
    --input-width: 150px;
}

/* Home and Back buttons */

.button-container {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-start; /* aligns to left */
    padding-left: 20px; /* slight indent to match product section */
}

.home-btn, .back-btn {
    display: inline-block;
    margin: 15px 10px 15px 0;
    background-color: var(--black); /* black fill */
    color: #fff; /* white font */
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}
.home-btn:hover, .back-btn:hover {
    background-color: #333; /* slightly lighter black on hover */
}

/* Reset / base */
* { box-sizing: border-box; }
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
}

/* Header */
header {
    background-color: var(--black);
    color: #fff;
    padding: var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Filters */
.filters {
    background-color: var(--card-bg); 
    padding: var(--spacing);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.filter-group {
    margin-bottom: 10px;
}
.filter-group h4 { margin-bottom: 10px; }
.filter-group button {
    margin: 5px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: var(--card-bg);
    cursor: pointer;
}
.filter-group button.active {
    background-color: var(--black);
    color: #fff;
}

/* Product grid (kept from earlier additions) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}
.product-card {
    background-color: var(--card-bg);
    padding: 18px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    min-width: 100%;
    position: relative;
}
.image-container {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.image-container.no-logo {
    background: #eee;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.product-card .card-body {
    flex: 1;
    width: 50%;
}
.product-card h5 {
    margin: 0 0 6px 0;
    font-size: 18px;
}
.product-card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    text-align: justify;
}
.product-card .card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 25%;
}
.product-card .card-actions button {
    background-color: #efefef;
    color: var(--text);
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

/* Layout: content + sidebar + training */
.content {
    display: flex;
    gap: 20px;
    padding: 20px;
}
.sidebar {
    width: 350px;
    padding: 0;
}
.training-section {
    width: 350px;
    padding: 0;
}

/* Sidebar product card (shared styles with product-card but kept for specificity) */
.sidebar-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--card-bg);
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    margin-bottom: 14px;
    flex-wrap: wrap;
    position: relative;
}
.product-logo {
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
}
.product-info { 
flex: 1 1 100%;
    width: 100%;
    margin-top: 12px;
 }
.product-info h5 {
    margin: 0 0 6px 0;
    font-size: 20px;
}
.product-info p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    margin-left: 8px;
}
.product-actions .btn-light {
    background: var(--light);
    color: var(--text);
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    width: var(--btn-width);
}
.product-actions .btn-dark {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    width: var(--btn-width);
}

/* Owner card */
.owner-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--card-bg);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}
.owner-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.owner-info { flex: 1; font-size: 14px; }
.owner-info .title { font-weight: 600; margin-bottom: 4px; }
.owner-links { display: flex; gap: 12px; }
.owner-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

/* Usage, Access, Cost, and Training cards */
.usage-card, .access-card, .cost-card, .training-card {
    background-color: var(--card-bg);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.usage-card h4, .access-card h4, .cost-card h4, .training-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.usage-card p, .access-card p, .cost-card p, .training-card p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text);
}
.training-card .btn-request-training {
    background-color: var(--black);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 8px;
    margin-bottom: 20px;
}
.training-card .btn-request-training:hover {
    background-color: #333;
}

/* Training videos layout */
.training-videos {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}
.video-column {
    text-align: center;
}
.training-link {
    display: block;
    text-decoration: none;
    color: var(--text);
}
.training-thumbnail {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 8px;
}
.training-link p {
    margin: 0;
    font-weight: 600;
}

/* Training videos not available message */
.training-videos > p {
    text-align: center;
    font-style: italic;
    color: var(--muted);
}

/* Details panel */
.details {
    flex: 1;
    background-color: var(--card-bg);
    padding: 20px;
    border: 1px solid #ddd;
}
.details h3 { margin-top: 0; }
.details p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

/* Estimate box */
.estimate-box { margin-top: 20px; }
.estimate-box input {
    padding: 8px;
    margin-right: 10px;
    width: var(--input-width);
}
.estimate-box button {
    padding: 8px 12px;
    background-color: var(--black);
    color: #fff;
    border: none;
    cursor: pointer;
}

/* Tag styles */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: bold;
    color: black;
    position: absolute;
    top: 10px;
    right: 10px;
}
.tag-core {
    background-color: grey;
}
.tag-marketplace {
    background-color: green;
}
.tag-pilot {
    background-color: orange;
}

/* Product logo container for positioning tag */
.product-logo-container {
    position: relative;
    display: inline-block;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    margin-left: 5px;
}

.read-more:hover {
    text-decoration: underline;
}
