/* TraxIQ Inventory Plugin Styles */
.traxiq-inventory {
    --traxiq-accent: #F97316;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
}

/* Search */
.traxiq-search-bar {
    position: relative;
    margin-bottom: 16px;
}
.traxiq-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #999;
}
.traxiq-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.traxiq-search-input:focus {
    border-color: var(--traxiq-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--traxiq-accent) 15%, transparent);
}

.traxiq-count {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}
.traxiq-count-num { font-weight: 700; }

/* Grid Layout */
.traxiq-grid.traxiq-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* List Layout */
.traxiq-grid.traxiq-layout-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Cards */
.traxiq-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.25s, transform 0.2s;
    background: #fff;
}
.traxiq-card:hover {
    box-shadow: 0 8px 30px color-mix(in srgb, var(--traxiq-accent) 12%, transparent);
    transform: translateY(-2px);
}

.traxiq-card-image {
    aspect-ratio: 16/10;
    background: #f3f4f6;
    overflow: hidden;
}
.traxiq-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.traxiq-card:hover .traxiq-card-image img {
    transform: scale(1.03);
}

.traxiq-no-photo {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 13px;
}

.traxiq-card-body { padding: 16px; }
.traxiq-card-title { font-size: 16px; font-weight: 600; margin: 0; }
.traxiq-card-type { font-size: 12px; color: #888; margin: 3px 0 10px; }
.traxiq-card-meta { display: flex; justify-content: space-between; align-items: center; }
.traxiq-price { font-weight: 700; color: var(--traxiq-accent); font-size: 17px; }
.traxiq-card-details { display: flex; gap: 10px; font-size: 12px; color: #888; }

/* List row */
.traxiq-list-row { display: flex; gap: 16px; padding: 14px; }
.traxiq-list-thumb { width: 120px; height: 85px; border-radius: 10px; overflow: hidden; background: #f3f4f6; flex-shrink: 0; }
.traxiq-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.traxiq-list-info { flex: 1; min-width: 0; }
.traxiq-list-info .traxiq-card-details { margin-top: 4px; }

/* Modal */
.traxiq-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.traxiq-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.traxiq-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 920px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.traxiq-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    line-height: 1;
}
.traxiq-modal-close:hover { color: #000; }

/* Detail */
.traxiq-detail-layout { display: grid; gap: 28px; }
.traxiq-detail-layout.has-photos { grid-template-columns: 1fr 1fr; }

.traxiq-detail-main-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 4/3;
}
.traxiq-detail-main-photo img { width: 100%; height: 100%; object-fit: cover; }

.traxiq-gallery-prev, .traxiq-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.traxiq-gallery-prev { left: 10px; }
.traxiq-gallery-next { right: 10px; }
.traxiq-gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.traxiq-detail-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
}
.traxiq-thumb {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
}
.traxiq-thumb.active {
    opacity: 1;
    border-color: var(--traxiq-accent);
}

.traxiq-detail-title { font-size: 24px; font-weight: 700; margin: 0; }
.traxiq-detail-type { color: #888; font-size: 14px; margin: 4px 0 16px; }
.traxiq-detail-price { font-size: 30px; font-weight: 800; color: var(--traxiq-accent); margin-bottom: 20px; }

.traxiq-detail-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.traxiq-spec {
    background: #f9fafb;
    border-radius: 10px;
    padding: 10px 14px;
}
.traxiq-spec-label { display: block; font-size: 11px; color: #888; margin-bottom: 2px; }
.traxiq-spec-value { font-size: 15px; font-weight: 600; }

.traxiq-detail-section { margin-bottom: 16px; }
.traxiq-detail-section h4 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.traxiq-detail-section p { font-size: 14px; color: #555; line-height: 1.6; margin: 0; }

.traxiq-empty { text-align: center; padding: 40px; color: #999; }
.traxiq-error { color: #dc2626; font-weight: 600; }

.traxiq-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: #bbb;
}
.traxiq-footer a {
    color: var(--traxiq-accent);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .traxiq-detail-layout.has-photos { grid-template-columns: 1fr; }
    .traxiq-modal-content { padding: 16px; }
    .traxiq-grid.traxiq-layout-grid { grid-template-columns: 1fr; }
    .traxiq-list-thumb { width: 90px; height: 65px; }
}
