/* css/inventory-item.css */

/* Essential Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header adjustments for inventory item page */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Inventory Item specific styles */
.inventory-item-section {
    margin-top: 80px; /* Account for fixed header */
    padding: 2rem 0;
}

.part-detail-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.gallery-container {
    text-align: center;
}

.main-image {
    margin-bottom: 1rem;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    aspect-ratio: 1/1;
    object-fit: cover;
}

.thumbnail-gallery {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: border 0.2s;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #ffc107;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.part-info {
    padding: 1rem;
}

.part-info h1 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.part-details-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.part-details-list li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.part-details-list li strong {
    display: inline-block;
    width: 150px;
    color: #555;
    font-weight: 600;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price::before {
    content: "💰";
    font-size: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-cart {
    background: #3498db;
    color: white;
}

.btn-add-cart:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-add-quote {
    background: #f39c12;
    color: white;
}

.btn-add-quote:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-contact {
    background: #2ecc71;
    color: white;
}

.btn-contact:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.part-lower-details {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.part-lower-details h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.part-lower-details h2::before {
    content: "📋";
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.spec-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.spec-table td:first-child {
    font-weight: bold;
    width: 200px;
    color: #555;
}

.social-sharing {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.social-sharing h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #1da1f2; }
.btn-linkedin { background-color: #0077b5; }

.related-parts-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 0;
}

.related-parts-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.inventory-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.inventory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.inventory-item:hover .item-image img {
    transform: scale(1.05);
}

.item-content {
    padding: 1rem;
}

.item-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.item-content h3 a {
    color: inherit;
    text-decoration: none;
}

.item-content h3 a:hover {
    color: #ffc107;
}

.item-content .price {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-small:hover {
    background: #e0a800;
    transform: translateY(-2px);
    text-decoration: none;
    color: #333;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }
    
    .part-detail-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .inventory-item-section {
        margin-top: 70px;
        padding: 1rem 0;
    }
    
    .part-detail-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1rem;
        padding: 1rem;
    }
    
    .part-info h1 {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions .btn {
        width: 100%;
    }
    
    .part-details-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .part-details-list li strong {
        width: auto;
        margin-bottom: 0.25rem;
    }
    
    .social-share-buttons {
        justify-content: center;
    }
    
    .related-parts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .part-detail-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .part-info {
        padding: 0.5rem;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 60px;
    }
    
    .part-lower-details {
        margin: 1rem auto;
        padding: 1rem;
    }
    
    .spec-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .spec-table td:first-child {
        width: 150px;
    }
}
